/**

   llist.h
   =======

   Datacenter linked lists header

**/


#ifndef LLIST_H
#define LLIST_H


/**

   Includes
   --------

   - dc.h    : datacenters

**/


#include "dc.h"


/**

   Structure: struct llist
   -------------------------

   Datacenter double linked list entry point
   Members are:

   - head    : linked list entry point
   - n       : elements count
   - compare : function for element comparison

**/


struct llist
{
  struct dc* head;
  int (*compare)(struct dc*, struct dc*);
};


/**

   Prototypes
   ----------

**/

struct llist* llist_create(int (*compare)(struct dc*, struct dc*));
int llist_delete(struct llist*);
int llist_insert(struct llist*,struct dc*);
int llist_remove(struct llist*,struct dc*);


#endif
